<?php
namespace Admin\Controller;
use Think\Controller;
/**
 * Created by PhpStorm.
 * User: zhaojia
 * Date: 15-9-7
 * Time: 下午6:20
 */
class CommonController extends Controller{
    public function _initialize(){
        if(!isset($_SESSION['username'])){
            //跳到登录页
            $this->error('请您先登录',U('Login/index'));
        }
    }


}